package com.example.javaRegist;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Created by Administrator on 2017/1/12 0012.
 */

@RestController
public class regController {

    @Resource(name = "shanyA")
    private Shanhy shanhyA;

    @Autowired
    @Qualifier("shanyB")
    private Shanhy shanhyB;

    @RequestMapping("/javaregtest")
    public String test(){
        shanhyA.display();
        shanhyB.display();
        return"test";
    }
}
